package com.caseProcess.service.impl;

import com.caseProcess.entity.Department;
import com.caseProcess.entity.User;

import com.caseProcess.mapper.DepartmentDao;
import com.caseProcess.service.DepartmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Resource
    DepartmentDao departmentDao;

    @Override
    public List<Department> getDepartments(Long deepth) {
        return departmentDao.getDepartments(deepth);
    }

    @Override
    public int insert(Department department) {
        return departmentDao.insert(department);
    }

    @Override
    public int update(Department department) {
        return departmentDao.update(department);
    }

    @Override
    public int delete(String departmentId) {
        return departmentDao.delete(departmentId);
    }

    @Override
    public Department isExist(String departmentId, String departmentName) {
        return departmentDao.isExist(departmentId,departmentName);
    }

    @Override
    public List<Department> selectDepartments() {
        return departmentDao.selectDepartments();
    }

    @Override
    public List<Department> getDepByConditions(String departmentId, String departmentName, String description) {
        return departmentDao.getDepByConditions(departmentId,departmentName,description);
    }
}
